package com.sand.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "appointmentform", schema = "ssh_pro", catalog = "")
public class AppointmentformEntity {
/**
 *
 *
 * @author <achao1441470436@gmail.com>
 * @since 2021/12/3/003 11:12
 */
    private int rid;
    private int userId;
    private int houseId;
    private String appointment;
    private String reservedCall;
    private String status;

    @Id
    @Column(name = "rid")
    public int getRid() {
        return rid;
    }

    public void setRid(int rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "userId")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "houseId")
    public int getHouseId() {
        return houseId;
    }

    public void setHouseId(int houseId) {
        this.houseId = houseId;
    }

    @Basic
    @Column(name = "appointment")
    public String getAppointment() {
        return appointment;
    }

    public void setAppointment(String appointment) {
        this.appointment = appointment;
    }

    public AppointmentformEntity() {
    }

    public AppointmentformEntity(int rid, int userId, int houseId, String appointment, String reservedCall, String status) {
        this.rid = rid;
        this.userId = userId;
        this.houseId = houseId;
        this.appointment = appointment;
        this.reservedCall = reservedCall;
        this.status = status;
    }

    @Basic
    @Column(name = "reservedCall")
    public String getReservedCall() {
        return reservedCall;
    }

    public void setReservedCall(String reservedCall) {
        this.reservedCall = reservedCall;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AppointmentformEntity that = (AppointmentformEntity) o;
        return rid == that.rid && userId == that.userId && houseId == that.houseId && Objects.equals(appointment, that.appointment) && Objects.equals(reservedCall, that.reservedCall) && Objects.equals(status, that.status);
    }

    @Override
    public String toString() {
        return "AppointmentformEntity{" +
                "rid=" + rid +
                ", userId=" + userId +
                ", houseId=" + houseId +
                ", appointment='" + appointment + '\'' +
                ", reservedCall='" + reservedCall + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    @Override
    public int hashCode() {
        return Objects.hash(rid, userId, houseId, appointment, reservedCall, status);
    }
}
